Integrand size = 19, antiderivative size = 61 \[ \int \cot (c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {a^2 \log (\cos (c+d x))}{d}+\frac {(a+b)^2 \log (1-\sec (c+d x))}{2 d}+\frac {(a-b)^2 \log (1+\sec (c+d x))}{2 d} \]
Time = 0.15 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.89 \[ \int \cot (c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {2 a^2 \log (\cos (c+d x))+(a+b)^2 \log (1-\sec (c+d x))+(a-b)^2 \log (1+\sec (c+d x))}{2 d} \]
(2*a^2*Log[Cos[c + d*x]] + (a + b)^2*Log[1 - Sec[c + d*x]] + (a - b)^2*Log [1 + Sec[c + d*x]])/(2*d)
Time = 0.26 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.15, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3042, 25, 4373, 524, 219, 240}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cot (c+d x) (a+b \sec (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2}{\cot \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\left (a+b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )\right )^2}{\cot \left (\frac {1}{2} (2 c+\pi )+d x\right )}dx\) |
\(\Big \downarrow \) 4373 |
\(\displaystyle -\frac {b^2 \int \frac {\cos (c+d x) (a+b \sec (c+d x))^2}{b \left (b^2-b^2 \sec ^2(c+d x)\right )}d(b \sec (c+d x))}{d}\) |
\(\Big \downarrow \) 524 |
\(\displaystyle -\frac {b^2 \left (\frac {\left (a^2+b^2\right ) \int \frac {b \sec (c+d x)}{b^2-b^2 \sec ^2(c+d x)}d(b \sec (c+d x))}{b^2}+2 a \int \frac {1}{b^2-b^2 \sec ^2(c+d x)}d(b \sec (c+d x))+\frac {a^2 \log (b \sec (c+d x))}{b^2}\right )}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {b^2 \left (\frac {\left (a^2+b^2\right ) \int \frac {b \sec (c+d x)}{b^2-b^2 \sec ^2(c+d x)}d(b \sec (c+d x))}{b^2}+\frac {a^2 \log (b \sec (c+d x))}{b^2}+\frac {2 a \text {arctanh}(\sec (c+d x))}{b}\right )}{d}\) |
\(\Big \downarrow \) 240 |
\(\displaystyle -\frac {b^2 \left (-\frac {\left (a^2+b^2\right ) \log \left (b^2-b^2 \sec ^2(c+d x)\right )}{2 b^2}+\frac {a^2 \log (b \sec (c+d x))}{b^2}+\frac {2 a \text {arctanh}(\sec (c+d x))}{b}\right )}{d}\) |
-((b^2*((2*a*ArcTanh[Sec[c + d*x]])/b + (a^2*Log[b*Sec[c + d*x]])/b^2 - (( a^2 + b^2)*Log[b^2 - b^2*Sec[c + d*x]^2])/(2*b^2)))/d)
3.3.76.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[(x_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[Log[RemoveContent[a + b*x ^2, x]]/(2*b), x] /; FreeQ[{a, b}, x]
Int[((c_) + (d_.)*(x_))^2/((x_)*((a_) + (b_.)*(x_)^2)), x_Symbol] :> Simp[( c^2/a)*Log[x], x] + (-Simp[(b*c^2 - a*d^2)/a Int[x/(a + b*x^2), x], x] + Simp[2*c*d Int[1/(a + b*x^2), x], x]) /; FreeQ[{a, b, c, d}, x]
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _), x_Symbol] :> Simp[-(-1)^((m - 1)/2)/(d*b^(m - 1)) Subst[Int[(b^2 - x^ 2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]
Time = 0.69 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.79
method | result | size |
derivativedivides | \(\frac {a^{2} \ln \left (\sin \left (d x +c \right )\right )+2 a b \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )+b^{2} \ln \left (\tan \left (d x +c \right )\right )}{d}\) | \(48\) |
default | \(\frac {a^{2} \ln \left (\sin \left (d x +c \right )\right )+2 a b \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )+b^{2} \ln \left (\tan \left (d x +c \right )\right )}{d}\) | \(48\) |
risch | \(-i a^{2} x -\frac {2 i a^{2} c}{d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) a b}{d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) b^{2}}{d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) a b}{d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) b^{2}}{d}-\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(153\) |
Time = 0.28 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.11 \[ \int \cot (c+d x) (a+b \sec (c+d x))^2 \, dx=-\frac {2 \, b^{2} \log \left (-\cos \left (d x + c\right )\right ) - {\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, d} \]
-1/2*(2*b^2*log(-cos(d*x + c)) - (a^2 - 2*a*b + b^2)*log(1/2*cos(d*x + c) + 1/2) - (a^2 + 2*a*b + b^2)*log(-1/2*cos(d*x + c) + 1/2))/d
\[ \int \cot (c+d x) (a+b \sec (c+d x))^2 \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{2} \cot {\left (c + d x \right )}\, dx \]
Time = 0.19 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.02 \[ \int \cot (c+d x) (a+b \sec (c+d x))^2 \, dx=-\frac {2 \, b^{2} \log \left (\cos \left (d x + c\right )\right ) - {\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left (\cos \left (d x + c\right ) + 1\right ) - {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (\cos \left (d x + c\right ) - 1\right )}{2 \, d} \]
-1/2*(2*b^2*log(cos(d*x + c)) - (a^2 - 2*a*b + b^2)*log(cos(d*x + c) + 1) - (a^2 + 2*a*b + b^2)*log(cos(d*x + c) - 1))/d
Time = 0.30 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.66 \[ \int \cot (c+d x) (a+b \sec (c+d x))^2 \, dx=-\frac {2 \, a^{2} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) + 2 \, b^{2} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) - {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{2 \, d} \]
-1/2*(2*a^2*log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1)) + 2*b^2*l og(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1)) - (a^2 + 2*a*b + b^2)* log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1)))/d
Time = 14.38 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.57 \[ \int \cot (c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {b^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {a^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {b^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}{d}+\frac {2\,a\,b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d} \]